import React from 'react';
import { Button, Spin } from 'antd';
import { ActionButtonsProps } from '../types';
import styles from './index.less';

const ActionButtons: React.FC<ActionButtonsProps> = ({ 
  onClose, 
  onSave, 
  onApprove, 
  onReject, 
  loading 
}) => {
  return (
    <Spin spinning={loading}>
      <Button 
        className={`${styles['btn']} ${styles['btn-default']}`}
        onClick={onClose}
      >
        关闭
      </Button>
      
      <Button 
        className={`${styles['btn']} ${styles['btn-default']}`}
        onClick={onSave}
      >
        保存
      </Button>
      
      <Button 
        className={`${styles['btn']} ${styles['btn-danger']}`}
        onClick={onReject}
      >
        拒绝
      </Button>
      
      <Button 
        className={`${styles['btn']} ${styles['btn-primary']}`}
        onClick={onApprove}
      >
        同意
      </Button>
    </Spin>
  );
};

export default ActionButtons; 